Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add non-parameter attribute rendering #135

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

haszi
Copy link
Contributor

@haszi haszi commented Jun 3, 2024

Enable rendering of attributes for classes, exceptions, interfaces, methods and functions. The implementation feels a little off but it seems to work as intended (see attached test attribute_formatting_002.phpt).

I've also found a mistake I've made in the test attribute_formatting_001.phpt where the parameter attribute was outside of the <methodparam> element. I've corrected this by moving the attribute inside the element.

@Girgias
Copy link
Member

Girgias commented Jun 4, 2024

Thank you! I'd like the opinion of @TimWolla and @kocsismate about the generated XHTML

@TimWolla
Copy link
Member

TimWolla commented Jun 9, 2024

I don't have an opinion. I trust that you generate XHTML that looks good 😄

@haszi
Copy link
Contributor Author

haszi commented Jun 9, 2024

Function attributes were not rendering properly and there was no test for them either so I just pushed a commit to fix this.

@haszi
Copy link
Contributor Author

haszi commented Jun 9, 2024

Attributes of class, exception and interface synopses are rendering like this:

class1

@haszi
Copy link
Contributor Author

haszi commented Jun 9, 2024

Attributes of methods

method1

and functions

function1

@TimWolla
Copy link
Member

TimWolla commented Jun 9, 2024

I would prefer having a newline between every attribute as well.

@haszi
Copy link
Contributor Author

haszi commented Jun 9, 2024

I would prefer having a newline between every attribute as well.

Something like in the below screenshots?

Classes/exceptions/interfaces:
class1

Methods:
method1

Functions:
function1

@TimWolla
Copy link
Member

TimWolla commented Jun 9, 2024

Something like in the below screenshots?

Yes, looks great to me. Thank you.

Enable rendering of attributes for classes, exceptions, interfaces, methods and functions.
@haszi haszi force-pushed the Add-non-parameter-attribute-rendering branch from e434d42 to e74ff2e Compare June 9, 2024 20:26
@haszi
Copy link
Contributor Author

haszi commented Jun 9, 2024

I've just pushed the commit to render every attribute on its own line (just like in the last set of screenshots).

@kocsismate
Copy link
Member

Thank you! I'll implement the required gen_stub.php related changes

@kocsismate kocsismate merged commit 472dd3c into php:master Jun 10, 2024
9 checks passed
@haszi haszi deleted the Add-non-parameter-attribute-rendering branch June 11, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants